<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var isAnagram = function(s, t) {
				if(s.length == t.length){
					if([...s].sort().join('') === [...t].sort().join('')){
						return true;
					}else{
						return false;
					}
				}else{
					return false;
				}
			};
			console.log(isAnagram("anagram","nagaram"));
		</script>
	</body>
</html>
